#ifndef _CSPCONFIG_H_
#define _CSPCONFIG_H_

#include <libspe2.h>
#include <string>
#include <map>
#include <pthread.h>
#include "SpuProgram.h"
#include "ProcessComposition.h"


using namespace std;

class CSPConfig{
	private:
		pthread_mutex_t  mutex;
		map<long, SpuProgram*> programs;
	public:
		CSPConfig();
		void add_csp_program(string path, string mnemonic);
		SpuProgram* GetProgram(unsigned long hash);
		SpuProgram* GetProgram(string mnemonic);
		bool ProgramExists(uint64_t hash);
};


#endif
